﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace Xqsys.DAL
{
    public class Report
    {
        /// <summary>
        /// 提交周报
        /// </summary>
        /// <param name="report"></param>
        /// <returns>bool 成功与否</returns>
        public bool AddReport(MODEL.Report report)
        {
            SqlParameter[] param = new SqlParameter[]
            {              
                new SqlParameter("@usersID",report.UsersID),
                new SqlParameter("@week",report.Week),
                new SqlParameter("@intime",report.Intime),
                new SqlParameter("@isConmmit",report.IsCommit),
                new SqlParameter("@text",report.Text),
                new SqlParameter("@type",report.Type)
            };
            return COM.SqlHelper.ExecuteNonQuery("sp_AddReport", param);
        }
        /// <summary>
        /// 查找所有周报列表
        /// </summary>
        /// <returns>周报列表</returns>
        public DataSet GetAllReport()
        {
            return COM.SqlHelper.ExecuteQuery("sp_GetAllReport");
        }
    }
}
